﻿using Yitter.IdGenerator;

namespace Single.YitId
{
    public static class YitIdHelper
    {
        static YitIdHelper()
        {
            // 配置雪花 Id 算法机器码
            Yitter.IdGenerator.YitIdHelper.SetIdGenerator(new IdGeneratorOptions
            {
                WorkerId = 1 // 取值范围 0~63 , 默认 1
            });
        }

        public static long NextId()
        {
            return Yitter.IdGenerator.YitIdHelper.NextId();
        }
    }
}